import request from "@/utils/request";

export const addMessageAPI = async (data) =>
  await request.post("/api/message", data);

export const deleteMessageAPI = async (id) =>
  await request.delete(`/api/message/${id}`);

export const getMessageAPI = async ({
  page = 1,
  limit = 10,
  blogid = -1,
  keyword = "",
}) =>
  await request.get("/api/message", {
    params: {
      page,
      limit,
      blogid,
      keyword,
    },
  });
